Repository navigation
Conversation
Spec first (rule 3), no handlers and no compiler. The crate depends on vstd only. - ops.rs: the instruction set (register moves, constants, int32 and double arithmetic, comparisons, branches, property get/set with an inline-cache index, element get/set, calls and returns, closures, environment access, iteration, generator suspend and resume, throw), each op classed Core, Guarded or Handler, and the handler it calls. - spec.rs: NaN-boxed u64 values (encode and decode), ECMA-262 Number operations on IEEE 754 bit patterns (pinned commit 0248456c), the abstract machine (frames as windows of the value-stack region, pc, heap as a map, inline-cache tables), `fast_path`, `fast_step`, the uninterpreted `handler`, and `step`. Modelling choices are listed at the top of the file. - lemmas.rs: encode/decode round trips, op classes, core ops keep the machine well-formed, Number comparison properties. - docs/ERRATA.md: Number::multiply gives +0 for +0 * -5. Verus: 67 verified, 0 errors. Tier stays 0; nothing here is an implementation. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
atiernan
had a problem deploying
to
full-verification
November 16, 2026 22:37 — with
GitHub Actions
Error
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atiernan
had a problem deploying
to
full-verification
November 16, 2026 23:36 — with
GitHub Actions
Error
atiernan
changed the base branch from
claude/js-jit-compiler-next-21ddc8
to
claude/js-lexer-impl
November 17, 2026 13:11
atiernan
had a problem deploying
to
full-verification
November 17, 2026 13:43 — with
GitHub Actions
Error
CI's proof job requires a mutations.json for every crate Verus checks. Three mutations of Number::multiply's zero signs (steps 4.b, 5.b and the step 5a erratum), each killed by lemma_multiply_zero_signs, a new lemma that evaluates the four zero-product cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atiernan
had a problem deploying
to
full-verification
November 17, 2026 21:14 — with
GitHub Actions
Error
The mutation tool checks a kill certificate in its own module, and Verus evaluates every compute_only assert of that module first. The zero-product lemma evaluated in lemmas.rs, so each mutant would stop Verus before its certificate ran. It moves to examples.rs, as in clazel-base64, and the certificates call it from there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atiernan
had a problem deploying
to
full-verification
November 18, 2026 13:37 — with
GitHub Actions
Error
atiernan
temporarily deployed
to
full-verification
November 20, 2026 14:25 — with
GitHub Actions
Inactive
atiernan
requested a deployment
to
full-verification
November 20, 2026 20:22 — with
GitHub Actions
Queued
This branch is being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 7 item 7.4: the bytecode instruction set and its Verus semantics,
spec fn step. The spec and the op list are committed together, before any handler or compiler code (rule 3). jit.md's front-end proofs will refine this spec.Stacked on #176. Merge that PR first, or retarget this one to
mainafterwards.What's here
crates/clazel-js-vmis a new crate: tier 0, depending only onvstdand on no browser crate.src/ops.rs: the op list, in three classes.this/callee/argc, and the undefined and nullish jumps.fast_stepwhenfast_path(s, op)holds, and the handler otherwise: arithmetic, bitwise ops, comparisons,JumpIfTrueandJumpIfFalse,Loop, the TDZ check, property and element get and set with inline caches,CallandReturn, and environment slots. The JIT inlines the fast path and exits otherwise.typeof, globals,new, iteration,yieldandawait, andthrow.HandlerIddoubles as the JIT's exit code.src/spec.rs:u64s. A double is itself with NaN canonicalized; int32, the specials, heap references (u32index plusu16generation) and raw values are tagged in the NaN space.fp,pc, the heap as an abstract map, code, inline caches, the pending exception and the termination flag.step: written asif fast_path { fast_step } else { handler(..) }, wherehandleris an uninterpretedspec fn. There are no axioms.src/lemmas.rsproves:state_wf;For the spec reviewer, first
fast_pathconditions forCall,Return,GetPropandGetElem, since the JIT's guards must equal them.-0).Divalways gives a double.handlerhas no contract here. What the JIT needs from handlers becomes their contracts in 7.8.Erratum
+0for+0 × -5and-5 × +0, because steps 4 and 5 only handle-0. 𝔽(0) is+0, but IEEE 754 and every engine give-0. I checked this against the pinned text.number_multiplyimplements the evident intent. It is recorded indocs/ERRATA.md, with "Reported upstream: not yet".Known gaps
Call/Returnare not yet proven to preservestate_wf; only core ops are.f64_of_int(1)andto_int32(2^31). Their formulas were checked against real doubles.f64_*_finiterounding functions will need a TCB entry when the JIT lands: the hardware'saddsdand its siblings must agree with them.Verification
verification results:: 67 verified, 0 errors.cargo xtask check: STATIC CHECKS PASSED.cargo build -p clazel-js-vmand clippy-D warningsare clean.cargo xtask verify --changedwas not run locally, because the new crate changesCargo.lock. CI's full verification is the check, and its proof jobs need approval.🤖 Generated with Claude Code